/*
 * @Autor: CQJ
 * @Date: 2022-08-15 13:41:15
 * @LastEditors: zhuzhaofeng
 * @LastEditTime: 2022年08月31日14:25:48
 * @Description:
 */
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist' //持久化状态管理
const pinia = createPinia()

import useCollectManageStore from './modules/collect-manage'
import usePermissionStore from './modules/permission'
import useLayoutStore from './modules/layout'
import useUserStore from './modules/user'
import useSystemStore from './modules/system'
const useStore = () => ({
  collectManage: useCollectManageStore(),
  permission: usePermissionStore(),
  layout: useLayoutStore(),
  user: useUserStore(),
  system: useSystemStore()
})

export const store = pinia.use(piniaPluginPersist)
export default useStore
